#include <FS.h>
#include "examples/GUI Widgets/Buttons/Button_demo/Free_Fonts.h"

#include <TFT_eSPI.h>              // Hardware-specific library
#include <TFT_eWidget.h>           // Widget library
#include <functional>

#define CALIBRATION_FILE "/TouchCalData1"
#define REPEAT_CAL false

class CButtonWork
{
private:
    // This will store the current instance of CButtonWork
    static CButtonWork* currentInstance;
public:
    CButtonWork();
    ~CButtonWork();
    //
    void setup();
    //
    void loop();
    static void btnL_pressAction(void);
    static void btnL_releaseAction(void);
    static void btnR_pressAction(void);
    static void btnR_releaseAction(void);
    void initButtons();


    // ...
    std::function<void()> pressAction;  // for btnL
    std::function<void()> releaseAction;  // for btnL
  public:
    TFT_eSPI* tft;
    ButtonWidget *btnL;
    ButtonWidget *btnR;
    ButtonWidget* btn[2];
    uint8_t buttonCount;
};